# encoding: utf-8
""" 
@version: v1.0 
@author: autumner 
@license: Apache Licence  
@contact: 18322313385@163.com 
@site: https://gitee.com/autumner/pythoncookbook.git
@software: PyCharm Community Edition
@file: sixRegular.py
@time: 18-8-8 下午2:03
"""
'''
画一个蜂窝正六边形
'''
import turtle as t

t.setup()
t.pensize(3)
# t.hideturtle()
t.speed(10)
# t.up()
#R
length = 20


def many6Regular(length):
    for j in range(6):
        t.up()
        t.fd(length)
        t.lt(60)
        t.goto(t.pos())
        t.down()
        # t.showturtle()
        t.seth(60 * (j + 1))
        for i in range(6):
            t.fd(length)
            t.rt(60)
            t.write(t.pos(), font=('Times',8, 'normal'))


many6Regular(length)




t.done()
